/**
 * 
 */
package teshop.domain;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 * Vendor of the Product
 * Created: 25.02.2009
 * @author Hryhory Lira
 *
 */
@Entity
public class Vendor implements Serializable {
	
	private static final long serialVersionUID = 6814131700949163469L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long vendorId;
	
	@Basic
	private String name;
	
	@Basic
	private String description;
	
	@OneToMany(fetch = FetchType.LAZY)
	private List<Product> products;

	/**
	 * @return the vendorId
	 */
	public Long getVendorId() {
		return vendorId;
	}

	/**
	 * @param vendorId the vendorId to set
	 */
	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the products
	 */
	public List<Product> getProducts() {
		return products;
	}

	/**
	 * @param products the products to set
	 */
	public void setProducts(List<Product> products) {
		this.products = products;
	}

}
